﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Spine;
using Spine.Unity;

public class SkeletonStartAgain : MonoBehaviour {

    private SkeletonAnimation animationMain;

    private string aniName;
    public void Awake()
    {
        animationMain = GetComponent<SkeletonAnimation>();

        aniName = animationMain.AnimationName;

    }

    // Use this for initialization
    void Start () {
      
    }
	
	// Update is called once per frame
	void Update () {
		
	}
    private void OnEnable()
    {
        if(this.animationMain.state != null)
            this.animationMain.state.SetAnimation(0, aniName, false);
    }
}
